<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
	<jsp:include page="../common/ListUIHead.jsp"></jsp:include>
	<title>人员</title>
</head>
<body style="padding:1px 3px 1px 3px;overflow:hidden">
	<div id="main">
		<div position="center">
			<div id="toolBar">
			</div>
			<div id="tableContainer">
			</div>
	    </div>
    </div>
</body>
</html>
<script type="text/javascript">
	$list_editUrl = getPath()+"/meal/mealPerson/edit";//编辑及查看url
	$list_addUrl = getPath()+"/meal/mealPerson/add";//新增url
	$list_deleteUrl = getPath()+"/meal/mealPerson/delete";//删除url
	$list_dataType = "人员";//数据名称
	$(document).ready(function(){
		$("#main").ligerLayout({});
		tb = $("#toolBar").ligerToolBar({
			items:[{id:'add',text:'新增',click:addRow,icon:'add'}]
			});
		$("#toolBar").append(
			'<div style="float:right;padding-right:50px">'
	    	+'	<form onsubmit="searchData();return false;">'	
		    +'		<input type="text" name="searchKeyWord" onfocus="if(this.value==this.defaultValue){this.value=\'\';}" onblur="if(this.value==\'\'){this.value=this.defaultValue;}" title="名称/QQ/电话" defaultValue="名称/QQ/电话" value="名称/QQ/电话" id="searchKeyWord" class="input"/>'
		    +'		<a class="mini-button" href="javascript:void(0)"><span class="mini-button-low-text" onclick="searchData();return false;">查询</span></a>'
	    	+'	</form>'
	    	+'</div>'
		);
		$list_dataGrid = $("#tableContainer").ligerGrid($.extend($list_defaultGridParam,{
            columns: [ 
	            {display: '姓名', name: 'name', align: 'left', width: 80},
	            {display: 'QQ', name: 'qq', align: 'left', width: 120},
	            {display: '电话', name: 'phone', align: 'left', width: 120},
	            {display: '操作', name: 'operate', align: 'center', width: 160,render:operateRender}
	        ],
            url:getPath()+'/meal/mealPerson/listData'
        }));
	});
	function operateRender(data,filterData){
			return '<a href="javascript:viewRow({id:\''+data.id+'\'});">查看</a>&nbsp;&nbsp;&nbsp;&nbsp;'
				+'<a href="javascript:editRow({id:\''+data.id+'\'});">编辑</a>&nbsp;&nbsp;&nbsp;&nbsp;'
				+'<a href="javascript:deleteRow({id:\''+data.id+'\'});">删除</a>';
	}
</script>